#if !USE_CONSOLE

#ifndef WINDOW_H
#define WINDOW_H

#include <QtGui>
#include <vector>
#include <iostream>

#include "src/interface/output.h"
#include "src/interface/glwidget.h"
#include "src/interface/cameraPanel.h"
#include "src/interface/renderPanel.h"
#include "src/interface/scenePanel.h"
#include "src/interface/imageDialog.h"

#include "src/scene/ray.h"
#include "src/scene/object.h"
#include "src/scene/light.h"

class Window : public QMainWindow{
	Q_OBJECT

	public:
		Window();
		~Window();

    public slots:
        void updateActionsFromEditing(int);
        void updateActionsFromSelection(int);
        void updateActionsFromChanging();
        void updateActionsFromChanging(int);
        void updateActionsFromLight(int = -1, int = -1);

    private slots:
        void testRaytracing(Ray);
//        void changeRaytracingDepth(int);
//        void updateImage(std::vector<double>);
        Scene *newScene(bool = false);
        void openObjects();
        void openScene();
        void saveScene();
        bool saveSceneAs();
//        void saveSceneImage();

        void addLight(Light *);
        void newAreaLightDialog();
        void newPointLightDialog();

        void addPrimitive(Object *);
        void newCuboidPrimitiveDialog();
        void newSpherePrimitiveDialog();
        void newCylinderPrimitiveDialog();
        void newConePrimitiveDialog();
//
//        void unionOperation(){tree->unionOperation(canvas);};
//        void intersectionOperation(){tree->intersectionOperation(canvas);};
//        void differenceOperation(){tree->differenceOperation(canvas);};

    private:
        QSize sizeHint() const;
        void createWindow();

        QToolBar *setOperationToolBar;
        QToolBar *geometricOperationToolBar;
        QAction *editObjectAct;
        QAction *deleteLightAct;
        QAction *deleteObjectAct;
        QAction *duplicateObjectAct;
        QAction *saveSceneAct;
        QAction *rayTestViewAct;
        QAction *newPointlLightAct;
        QAction *newAreaLightAct;
        QSpinBox *raytracingDepthSpinBox;
//        TreeWidget *tree;
        CameraPanel *cameraPanel;
        ScenePanel *scenePanel;
        RenderPanel *renderPanel;

        GLWidget *canvas;
        Output output;




//        QList<QTreeWidgetItem *> previousSelected;
//        bool inOperation;
};

#endif

#endif //!USE_CONSOLE
